package org.phalanx.client.UI;

import java.awt.Cursor;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class MouseCursorFactory {

	public static final Cursor getWriteTileCursor(){
		Cursor writeCursor = new Cursor(Cursor.DEFAULT_CURSOR);
		Toolkit tk = Toolkit.getDefaultToolkit();
		
		try {
			BufferedImage writeCursorImg = ImageIO.read(new File("./resources/images/cursors/writetile.png"));
			writeCursor = tk.createCustomCursor(writeCursorImg, new Point(0,0), "writeTile");
		
		} catch (IOException ie) {}
		
		return writeCursor;
	}
	
	public static final Cursor getZoomInCursor() {
		Cursor writeCursor = new Cursor(Cursor.DEFAULT_CURSOR);
		Toolkit tk = Toolkit.getDefaultToolkit();
		
		try {
			BufferedImage writeCursorImg = ImageIO.read(new File("./resources/images/cursors/zoomincursor.png"));
			writeCursor = tk.createCustomCursor(writeCursorImg, new Point(0,0), "zoomIn");
		
		} catch (IOException ie) {}
		
		return writeCursor;
	}
	
	public static final Cursor getZoomOutCursor() {
		Cursor writeCursor = new Cursor(Cursor.DEFAULT_CURSOR);
		Toolkit tk = Toolkit.getDefaultToolkit();
		
		try {
			BufferedImage writeCursorImg = ImageIO.read(new File("./resources/images/cursors/zoomoutcursor.png"));
			writeCursor = tk.createCustomCursor(writeCursorImg, new Point(0,0), "zoomIn");
		
		} catch (IOException ie) {}
		
		return writeCursor;
	}
}
